package com.example.makerspace.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.makerspace.domain.UserAuthenticationDO;
import com.example.makerspace.vo.PersonVO;
import com.example.makerspace.vo.ProductRecommendationVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserAuthenticationMapper extends BaseMapper<UserAuthenticationDO> {
    @Select("select e.*, d.avatar from  t_user_authentication   as e join t_user   as d on   e.phone = d.username ORDER BY e.create_time DESC")
    IPage<PersonVO> selectByOtherType(Page<PersonVO> page);
    @Select("select e.*, d.avatar from  t_user_authentication   as e join t_user   as d on   e.phone = d.username where  (e.name  like  '%${name}%' or e.phone like  '%${name}%')  ORDER BY e.create_time DESC")
    IPage<PersonVO> selectByOtherName(Page<PersonVO> page, String name);
}
